From f38c2801d3d76503fda69f433648fb0ba1baad82 Mon Sep 17 00:00:00 2001 From: robertl Date: Tue, 14 Oct 2003 13:20:00 +0000 Subject: [PATCH] Correctly terminate created string. From Mark Bradley. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@518 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpsbabel/util.c b/gpsbabel/util.c index 5219a6606..de96b5959 100644 --- a/gpsbabel/util.c +++ b/gpsbabel/util.c @@ -171,7 +171,7 @@ xstrndupt(const char *str, size_t sz) newstr = xmalloc(newlen + 1); memcpy(newstr, str, newlen); - newstr[newlen+1] = '\0'; + newstr[newlen] = '\0'; rtrim(newstr); return newstr; -- 2.30.2